Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Use file type based lint rules #621

Merged
merged 2 commits into from
Aug 14, 2020

Conversation

Gozala
Copy link
Contributor

@Gozala Gozala commented Aug 8, 2020

Without this change aegir either uses esmodule parse rules or script based parse rules, which causes issues with repos that contain both .ts and .js files regardless of --ts option. Without --ts option it complains about import statements with --ts option it complains about use of unnecessary 'use strict'.

This change introduces config for eslint that overrides based on file type using js config for js files and ts config for ts files. It also adds a test case which fails without this change.

Fixes #618

Copy link
Contributor

@jacobheun jacobheun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@achingbrain achingbrain changed the title Use file type based lint rules feat: Use file type based lint rules Aug 14, 2020
@achingbrain achingbrain merged commit fdc002e into master Aug 14, 2020
@achingbrain achingbrain deleted the gozala/eslint-filetype-override branch August 14, 2020 18:17
@achingbrain
Copy link
Member

This is great, thanks. I'm releasing this as a major because it has different rules for .ts files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

aegir lint complaints about imports in ts files
3 participants